#include "stdafx.h"
#include "luaHelp.h"
#include <Windows.h>

using namespace luaHelp;
DebugOut::DebugOut(void)
{
}

DebugOut::~DebugOut(void)
{
}
void	DebugOut::WriteLine( const char* pmsg )
{
	::OutputDebugString(pmsg);
	::OutputDebugString("\n");
}
void	DebugOut::WriteString(const char* fmt, ...)
{
	va_list arglist;
	char message[ 800 ];
	va_start( arglist, fmt );
	vsprintf( message, fmt, arglist );
	va_end( arglist );
	::OutputDebugString(message);
}

FileOut::FileOut( const char* filename )
{
	outFile.Open( filename );
}
FileOut::~FileOut(void)
{
	outFile.Close();
}

void	FileOut::WriteLine( const char* pmsg )
{
	outFile.Print(pmsg);
	outFile.Print("\n");
}
void	FileOut::WriteString(const char* fmt, ...)
{
	va_list arglist;

	va_start( arglist, fmt );
	outFile.Print(fmt,arglist);
	va_end( arglist );
}
